<%@ page language="java" contentType="text/javascript; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@page import='java.sql.*' %>
<%@page import="java.util.ArrayList"%>
<%@page import="net.sf.json.JSONObject"%>
<%@page import="net.sf.json.JSONSerializer"%>
<%@page import="net.sf.json.JSONArray"%>
<%@ page import="com.google.android.gcm.server.*" %>

<%
		
	response.setHeader("Access-Control-Allow-Origin", "*");
	response.setHeader("Access-Control-Allow-Headers", "origin, x-requested-with");

	String senderID = request.getParameter("senderID");
	String sender = request.getParameter("sender");
	String getterID = request.getParameter("getterID");
	String getter = request.getParameter("getter");
	String msg = request.getParameter("msg");
	//String msg = new String(request.getParameter("msg").getBytes("8859_1"), "utf-8");
	//msg = msg.replace("\n","<br>");
	//msg = msg.replace("\u0020","%nbsp;");
	String date = new java.text.SimpleDateFormat("yyyy-MM-dd").format(new java.util.Date());
	String time = new java.text.SimpleDateFormat("HH:mm:ss").format(new java.util.Date());
	
	Connection conn = null;
	PreparedStatement pstmt = null;
	PreparedStatement regpstmt = null;
	
	JSONObject jo = new JSONObject();
	
	try{
		jo.put("success", "true");
		jo.put("success", senderID);
		jo.put("success", sender);
		jo.put("success", getterID);
		jo.put("success", getter);
		jo.put("success", msg);
		out.print(jo);
	}
	
	
	finally{
		try{
			pstmt.close();
		}
		catch (Exception ignored){
		}
		try{
			regpstmt.close();
		}
		catch (Exception ignored){
		}
		try{
			conn.close();
		}
		catch (Exception ignored){
		}
	}
%>